import xlwings as xw
app = xw.App(visible=False, add_book=False)
book_src = app.books.open('F:\\python\\第4章\\员工档案表1.xlsx')
book_des = app.books.add()
sheet_des = book_des.sheets[0]
column_title = book_src.sheets[0].range('A1').expand('right')
column_title.copy(destination=sheet_des.range('A1'))
for i in book_src.sheets:
    data_src = i.range('A2').expand('table')
    data_des = sheet_des.range('A1').expand('down').last_cell.offset(row_offset=1)
    data_src.copy(destination=data_des)
book_src.close()
sheet_des.autofit()
book_des.save('F:\\python\\第4章\\员工档案表（合并）.xlsx')
app.quit()
